import React from 'react';
import { useNavigate, useSearchParams } from 'react-router-dom';

const JsglViews = () => {
  const [params, setParams] = useSearchParams()
  // console.log(params.get('id')); //123
  const id = params.get('id')
  console.log(id);

  const navigate = useNavigate()
  console.log(navigate); // 一个函数，

  return (
    <div>
      <h1>角色管理</h1>
      <button type='button' onClick={
        () => {
          navigate('/login')
        }
      }>到登录页面</button>
    </div>
  );
}

export default JsglViews;
